/**
 * @param {number[]} nums
 * @return {number}
 */
 var arraySign = function(nums) {
    let x = nums.reduce((pre,cur) => pre * cur)
    let ans = 0
    if(x > 0)
        ans = 1
    else if(x < 0)
        ans = -1
    return ans
};